<?php
include "../proses/konek.php";
if($_GET['kelas'])
{
	echo "<option selected>--Pilih MApel--</option>";
	$kls=$_GET['kelas'];
	$query=mysql_query("SELECT * FROM posting where kelas = '$kls'");
	while($mapel=mysql_fetch_assoc($query))
	{
		if ($mapel['kelas']!=null) {
		
		echo "<option>".$mapel['kategori']."</option>";
	}
	}
}
if($_GET['mapel'])
{
	echo "<option selected>--Pilih Guru--</option>";
	$mapel=$_GET['mapel'];
	$query2=mysql_query("SELECT DISTINCT author FROM posting where kategori = '$mapel'");
	while($guru=mysql_fetch_assoc($query2))
	{
		if ($guru['author']!=null) {
		
		echo "<option>".$guru['author']."</option>";
	}
	}
}
?>